package com.myproject.sbp.apollo.conf;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 情况二
 * 方式一
 * 复杂数据，不一一对应写出来
 * @author ywh
 */
@Data
@Component("testBean2")
@ConfigurationProperties(prefix = "redis")
public class TestBean2 {

    private int expireSeconds;
    private int commandTimeout;

    @Override
    public String toString() {
        return "TestBean2{" +
                "expireSeconds=" + expireSeconds +
                ", commandTimeout=" + commandTimeout +
                '}';
    }
}